package com.leyou.item.mapper;

import com.leyou.common.mapper.BaseMapper;
import com.leyou.item.pojo.Category;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CategoryMapper extends BaseMapper<Category> {

    @Select("select tc.id, tc.`name`, tc.parent_id, tc.is_parent, tc.sort from tb_category tc inner join tb_category_brand cb on tc.id=cb.category_id where cb.brand_id=#{bid}")
    List<Category> queryByBrandId(@Param("bid") Long bid);
}
